<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="__PUBLIC__/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="__PUBLIC__/font-awesome/css/font-awesome.min.css" media="all"/>
    <link rel="stylesheet" href="__CSS__/admin.css" media="all">
    <style type="text/css">

        /* tooltip */
        #tooltip {
            position: absolute;
            border: 1px solid #ccc;
            background: #333;
            padding: 2px;
            display: none;
            color: #fff;
        }

/*        .laytable-cell-1-create_time{
            max-width: 100px;
        }*/
    </style>
</head>
<body style="padding:10px;">
<div class="tplay-body-div">
    <div class="layui-tab">
        <ul class="layui-tab-title">
            <li class="layui-this">发放金额展示</li>
            <!-- <li><a href="{:url('admin/user/publish')}" class="a_menu">新增/修改用户</a></li> -->
        </ul>
    </div>
    <form class="layui-form serch">
        <div class="layui-form-item" style="float: left;">
            <div class="layui-input-inline">
                <input type="text" name="phone" id="phone" autocomplete="off"
                       placeholder="请输入手机号"
                       class="layui-input layui-btn-sm">
            </div>
            <div class="layui-input-inline">
                <div class="layui-inline">
                    <select name="type" id="type">
                        <option value="">类型</option>
                        {foreach $type as $k=>$v}
                        <option value="{$k}">{$v}</option>
                        {/foreach}
                    </select>
                </div>
            </div>
            <div class="layui-inline">
              <input type="text" class="layui-input test-item" placeholder="请选择开始时间" name="start" id="start">
            </div>
            <div class="layui-inline">
              <input type="text" class="layui-input test-item" placeholder="请选择结束时间" name="end" id="end">
            </div>
            <button class="layui-btn layui-btn-danger layui-btn-sm" id="lay_search" type="button" lay-filter="serch">立即提交</button>
        </div>
    </form>
    <hr class="layui-bg-blue">
    <!--表格-->
    <table id="lay_table" lay-filter="lay_table"></table>
    <!--表格结束-->

    {include file="public/foot"}
    <script type="text/javascript">


        //表格需要数据
        function table_need() {
            return [[ //表头
                {field: 'id', title: 'ID', width:80, sort: true, fixed: 'left'},
                {field: 'nickname', title: '昵称'},
                {field: 'phone', title: '手机号'},
                {field: 'money', title: '交易金额', sort: true},
                {field: 'balance', title: '此时账户', sort: true},
                {field: 'class', title: '金额状态'},
                {field: 'type', title: '类型'},
                {field: 'message', title: '信息'},
                {field: 'add_date',width:200,  title: '时间'}
            ]]
        }

        //搜索条件
        function search_content() {
            //要求搜索表单id必须和搜索条件一致
            return [
                "phone","type","start","end"
            ]
        }
        table_init(table_need(),search_content(),"/admin/Staticbonus/bonus");
        layui.use('laydate', function(){
            var laydate = layui.laydate;
             lay('.test-item').each(function(){
                laydate.render({
                  elem: this
                  ,trigger: 'click',
                  type: 'datetime'
                });
              });
        });
    </script>


</div>
</body>
</html>
